//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - SaaS Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================


//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - S+S Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Windows.Media.Imaging;

namespace LitwareHR.PublicApp.WinUX.Entities
{
    public class CubeTile : INotifyPropertyChanged
    {
        private string title;
        private int count;
        private BitmapImage image;

       public CubeTile(int Count, string Title)
        {
            title = Title;
            count = Count;
        }

        public CubeTile(int Count, string Title, BitmapImage Image)
        {
            title = Title;
            image = Image;
            count = Count;
        }

        public string Title
        {
            get { return title; }
            set { title = value; NotifyChange("Title"); }
        }

        public int Count
        {
            get { return count; }
            set { count = value; NotifyChange("Count"); }
        }

        public BitmapImage Image
        {
            get { return image; }
            set { image = value; NotifyChange("Image"); }
        }
        
        private void NotifyChange(string propName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
        }

        #region INotifyChanged Members
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion
    }

    public class CubeFace : INotifyPropertyChanged
    {
        private CubeTileCollection tiles = new CubeTileCollection();

        public CubeTileCollection Tiles
        {
            get { return tiles; }        
        }

        public void AddTile(CubeTile tile)
        {
            tiles.Add(tile);
            NotifyChange("Tiles");
        }

        private void NotifyChange(string propName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
        }
        
        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }

    public class CubeTileCollection : ObservableCollection<CubeTile>
    {
    }
    public class CubeFaceCollection : ObservableCollection<CubeFace>
    {
    }
}
